<template>
  <div>
    <Menu :visibleColumns="visibleColumns" :searchForm="searchForm" :columns="columns" url="/mdm/unspsc/query"></Menu>
  </div>
</template>

<script>
import Menu from '../../Demo/LhDemo/Menu'
export default {
  components: {
    Menu
  },
  name: 'unspsc',
  data () {
    return {
      //  控制项搜索是否显示
      searchToggle: false,
      data: [],
      selected: [],
      visibleColumns: [
        'code',
        'name',
        'createUserName',
        'createTime',
        'lastUpdateTime',
        'updateUserName',
        'classSn',
        'className',
        'nameEn',
        'commodityName',
        'commoditySn',
        'segmentSn',
        'segmentName',
        'familySn',
        'familyName'
      ],
      searchForm: {
        code: '',
        name: '',
        nameEn: '',
        segmentSn: '',
        segmentName: '',
        familySn: '',
        familyName: '',
        classSn: '',
        className: '',
        commoditySn: '',
        commodityName: '',
        createTime: '',
        createUserName: '',
        lastUpdateTime: '',
        updateUserName: ''
      },
      columns: [
        { name: 'code', required: true, label: '编码', align: 'left', field: 'code', sortable: true },
        { name: 'name', required: true, label: '名称', align: 'left', field: 'name', sortable: true },
        { name: 'nameEn', field: 'nameEn', align: 'left', label: '英文名称', sortable: true },
        { name: 'segmentSn', field: 'segmentSn', align: 'left', label: 'segmentSn', sortable: true },
        { name: 'segmentName', field: 'segmentName', align: 'left', label: 'segmentName', sortable: true },
        { name: 'familySn', field: 'familySn', align: 'left', label: 'familySn', sortable: true },
        { name: 'familyName', field: 'familyName', align: 'left', label: 'familyName', sortable: true },
        { name: 'classSn', field: 'classSn', align: 'left', label: 'classSn', sortable: true },
        { name: 'className', field: 'className', align: 'left', label: 'className', sortable: true },
        { name: 'commoditySn', field: 'commoditySn', align: 'left', label: 'commoditySn', sortable: true },
        { name: 'commodityName', field: 'commodityName', align: 'left', label: 'commodityName', sortable: true },
        { name: 'createUserName', field: 'createUserName', align: 'left', label: '创建人', sortable: true },
        { name: 'createTime', field: 'createTime', align: 'left', label: '创建时间', sortable: true },
        { name: 'lastUpdateTime', field: 'lastUpdateTime', align: 'left', label: '修改日期', sortable: true },
        { name: 'updateUserName', field: 'updateUserName', align: 'left', label: '修改人', sortable: true }
      ],
      total: 0,
      pagination: {
        page: 1,
        rowsPerPage: 10,
        rowsNumber: 10,
        sortBy: '',
        descending: Boolean
      }
    }
  }
}
</script>

<style lang="stylus" scoped>
  .h-td-maxwidth
    max-width 60px
  // 去除table header checkbox 所在td的top border
  .q-table--cell-separator td, .q-table--cell-separator th
    border-width 1px
    border-top-width 0
  .expand-row-label
    display inline-block
    width 40px
    text-align left
</style>
